<div class="judul"><?php echo anchor("/pembobotan_alternatif/", $title);?></div>
<?php
  $flashdata = $this->session->flashdata('message');
  $messages = isset ($flashdata)?pesan($flashdata):"";
  echo "$messages";
?>
<script type="text/javascript">
    $(document).ready(function(){
        $('#area1').hide();
        $('#toggler1').click(function(){
            $('#area1').slideToggle('fast');
        })
    })
</script>
    <fieldset>
        <legend id="toggler1">Data Kriteria</legend>
        <div id="area1">
            <table class="tabel">
                <th>No</th>
                <th>Kode</th>
                <th>Nama</th>
                <th>Jenis</th>
                <?php
                  $no = 1;
                  foreach ($listKriteria as $key => $row){
                ?>
                <tr class="<?php echo ($no%2)?"even":"odd";?>">
                    <td align="center" style="width: 5%"><?php echo $no++;?></td>
                    <td><?php echo "C".$row['id'];?></td>
                    <td><?php echo $row['nama'];?></td>
                    <td><?php echo $row['jenis'];?></td>
                </tr>
                <?php
                  }
                ?>
            </table>
        </div>    
    </fieldset>    
<div class="data-list">
    <table class="tabel" style="min-width: 50%;">
        <tr>
            <th style="width: 5%;">No</th>
            <th>Calon Adik Asuh</th>
            <?php
                foreach ($listKriteria as $key => $row){
            ?>
            <th><?php echo "C".$row['id'];?></th>
            <?
                }
            ?>
            <th>Aksi</th>
        </tr>
        <?php
          $i = 1;
          foreach ($listCalonAdikAsuh as $keys => $rows){
        ?>
        <tr class="<?php echo ($i%2)?"even":"odd";?>">
            <td style="text-align: center"><?php echo "$i";?></td>
            <td><?php echo $rows['nama'];?></td>
            <?php
                $j = 0;
                foreach ($listKriteria as $key => $row){
            ?>
            <td><?php echo $listBobot[$i-1][$j];?></td>
            <?php
                $j++;
                }
            ?>
            <td class="aksi">
                <?php
                  echo anchor('pembobotan_alternatif/edit_pembobotan_alternatif_form/'.$rows['id'], 'edit', 'class=edit title="edit"');
                ?>
            </td>
        </tr>
        <?php
         $i++;
          }
        ?>
    </table>
</div>